feat(auth): add SATP agent trust verification provider#171
feat(auth): add SATP agent trust verification provider#1710xbrainkid wants to merge 2 commits intoQuantGeekDev:mainfrom
Conversation
Adds SATPProvider as a new auth provider that verifies agent identity and behavioral trust scores via AgentFolio/SATP (Solana Agent Trust Protocol). Features: - Trust score verification with configurable minimum threshold - On-chain verification status check - Agent ID extraction from headers or Authorization bearer - Response caching with configurable TTL (default 5 min) - Graceful degradation (allow/reject on missing identity) - Composable with existing auth providers Resolves QuantGeekDev#142
|
@0xbrainkid This looks pretty good, and elegant. Thank you. If you don't mind - what's the best way for me to use this to replicate your results? I can add a docs section on this, or perhaps you could create a quickstart with what external services I need? Docs are in Fumadocs format in this repo - if you add it to the docs, the MCP-Framework MCP server will be able to integrate it automatically https://github.com/QuantGeekDev/mcp-framework-docs |
|
@QuantGeekDev — glad it fits well! Here's the quickstart: Quickstart1. No external services needed for basic usage. The provider queries the AgentFolio public API ( 2. Minimal test setup: import { SATPProvider } from "mcp-framework";
// Allow all agents, just annotate requests with trust data
const provider = new SATPProvider({ onMissing: "allow" });
// Or enforce minimum trust score
const strictProvider = new SATPProvider({
minTrustScore: 50,
requireVerified: true,
onMissing: "reject",
});3. Testing with a real agent: Send a request with the header 4. Testing without an agent: With DocsHappy to add a docs page in Fumadocs format. I'll push a follow-up commit to this PR with:
Give me a few hours and I'll have the docs commit ready. |
Adds quickstart, configuration reference, usage modes (annotation/enforcement/graduated), testing examples, and composition patterns for the SATPProvider.
|
that is quite neat. are there any rate limits that should be enforced for this on client code? |
|
@QuantGeekDev — good question. The AgentFolio API has a generous free tier (no key needed) with soft rate limits:
For high-throughput deployments, two options:
No client-side rate limiting needed in the provider code — the cache handles it naturally. Should I add a note about this in the docs? |
|
This is great. Merging and will add to next release. Thank you for your contribution |
Summary
Adds
SATPProvideras a new auth provider that verifies agent identity and behavioral trust scores via AgentFolio/SATP (Solana Agent Trust Protocol).Resolves #142
What it does
x-agent-idheader orAuthorization: Agent <id>onMissing: 'allow'(default) annotates requests without blocking;'reject'enforces identityUsage
Design decisions
onMissing: 'allow'means existing servers aren't affectedfetch)No new dependencies
Uses native
fetch(Node 18+). Zero additional packages.